home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / dev.fmt / scsi.man < prev    next >
Encoding:
Text File  |  1990-03-16  |  3.3 KB  |  135 lines

  1.  
  2.  
  3.  
  4. SCSI                         Devices                         SCSI
  5.  
  6.  
  7.  
  8. _________________________________________________________________
  9.  
  10. NNAAMMEE
  11.      scsi - Devices used to send arbitrary SCSI commands to  SCSI
  12.      devices
  13.  
  14. SSYYNNOOPPSSIISS
  15.      ##iinncclluuddee <<ddeevv//ssccssii..hh>>
  16.  
  17. _________________________________________________________________
  18.  
  19.  
  20. DDEESSCCRRIIPPTTIIOONN
  21.      SCSI devices are used to send  arbitrary  SCSI  commands  to
  22.      SCSI  devices.   The  interface uses IO-Controls to pass the
  23.      SCSI command block and command data to the device and return
  24.      the  command  status  byte,  command data, and any scsi mode
  25.      sense data generated.  The IO-Control IIOOCC__SSCCSSII__CCOOMMMMAANNDD takes
  26.      as  input  a Dev_ScsiCommand and returns in the out buffer a
  27.      Dev_ScsiStatus.
  28.  
  29.           typedef struct Dev_ScsiCommand {
  30.               int        bufferLen;
  31.               int        dataOffset;
  32.               int        commandLen;
  33.           } Dev_ScsiCommand;
  34.      The field bbuuffffeerrLLeenn specifies the length  of  the  command's
  35.      data  buffer.  The  data  buffer itself is located in the in
  36.      buffer for commands that send data to the device and the out
  37.      buffer  for  commands that return data. ddaattaaOOffffsseett specifies
  38.      the offset into the IO-Control's input buffer of  the  start
  39.      of  the  data buffer.  If bbuuffffeerrLLeenn is greater than zero and
  40.      the ddaattaaOOffffsseett equals the size of the input buffer then  the
  41.      command  is  assumed  to  return data.  The ccoommmmaannddLLeenn field
  42.      specifies the number of bytes following the  Dev_ScsiCommand
  43.      structure that make up the SCSI command block.
  44.  
  45.           typedef struct Dev_ScsiStatus {
  46.               int        statusByte;
  47.               int        amountTransferred;
  48.               int        senseDataLen;
  49.           } Dev_ScsiStatus;
  50.      The output buffer of the IIOOCC__SSCCSSII__CCOOMMMMAANNDD  command  consists
  51.      of  a  Dev_ScsiStatus  followed  by any data returned by the
  52.      device followed by any sense data generated by the  command.
  53.      The  field  ssttaattuussBByyttee  contains  the  SCSI  status  byte as
  54.      returned by the SCSI device and the field  aammoouunnttTTrraannssffeerrrreedd
  55.      reports the number of data bytes transferred by the command.
  56.      sseennsseeDDaattaaLLeenn reports the  number  of  bytes  of  sense  data
  57.      returned byte the command.  The out buffer looks like:
  58.  
  59.                Dev_ScsiStatus statusBlock;
  60.                char data[statuBlock.amountTransferred];
  61.                char modeSenseData[statuBlock.senseDataLen];
  62.  
  63.  
  64.  
  65. Sprite v.1.0        Printed:  March 15, 1990                    1
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72. SCSI                         Devices                         SCSI
  73.  
  74.  
  75.  
  76. WWAARRNNIINNGG
  77.      The SCSI command set supported by most devices include  some
  78.      very   destructive   commands   such   as   FORMAT_UNIT  and
  79.      ERASE_TAPE. Extreme care should be  taken  when  using  this
  80.      interface.
  81.  
  82. KKEEYYWWOORRDDSS
  83.      scsi command, scsi device, HBA
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131. Sprite v.1.0        Printed:  March 15, 1990                    2
  132.  
  133.  
  134.  
  135.